<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="extLibs" value="grid"/>
<sys:header title="互助会管理" extLibs="${extLibs}" />
<div class="portlet box ${boxStyleColor}">
	<div class="portlet-title">
		<div class="caption"><i class="fa fa-coffee"></i> 管委会审核</div>
		<div class="actions">
			<a href="#" class="btn btn-default btn-sm" id="btnSearch" title="查询"><i class="fa fa-search"></i> 查询</a>
		</div>
	</div>
	<div class="portlet-body list">
		<form:form id="searchForm" modelAttribute="fraternity" action="${ctx}/mih/fraternity/committeeListData" method="post" class="breadcrumb form-inline hide"
				data-page-no="${page.pageNo}" data-page-size="${page.pageSize}" data-order-by="${page.orderBy}">
			<div class="form-group">
				<label class="control-label">姓名：</label>
				<div class="input-inline">
					<form:input path="memberName" htmlEscape="false" maxlength="64" class="form-control input-sm width-160"/>
				</div>
			</div>
			<div class="form-group" style="margin-left:10px;"> 
				<input class="btn btn-primary btn-sm" type="submit" value="查询"/>&nbsp;
				<input class="btn default btn-sm" type="reset" value="重置"/>
			</div>
		</form:form>
		<table id="dataGrid"></table>
	    <div id="dataGridPage"></div>
	</div>
</div>
<sys:footer extLibs="${extLibs}" />
<script type="text/javascript">
	// 初始化DataGrid对象
	$("#dataGrid").dataGrid({
		
		searchForm: $("#searchForm"), // 数据来源表单
		tabPageId: '${param.tabPageId}',// 当前页签编号
		
		// 设置数据表格列
		columnModel: [
			{header:'姓名', name:'memberName', index:'a.member_name', width:120, align:"left", frozen:true, formatter: function(val, obj, row, act){
				return '<a href="${ctx}/mih/fraternity/form?id='+row.id+'" class="btnList" data-title="编辑互助会">'+(val ? val : row.id)+'</a>';
			}},
			{header:'性别', name:'sex', index:'a.sex', width:80, align:"center"},
			{header:'工作证号', name:'workNo', index:'a.work_no', width:100, align:"left"},
			{header:'工作时间', name:'workDate', index:'a.work_date', width:100, align:"center"},
			{header:'退休时间', name:'retireDate', index:'a.retire_date', width:100, align:"center"},
			{header:'身份证号码', name:'idNo', index:'a.id_no', width:150, align:"left"},
			{header:'家庭住址', name:'address', index:'a.address', width:150, align:"left"},
			{header:'手机', name:'phone', index:'a.phone', width:150, align:"left"},
			{header:'宅电', name:'homePhone', index:'a.home_phone', width:150, align:"center"},
			{header:'审批状态', name:'approveStatus', index:'a.approve_status', width:200, align:"left", formatter: function(val, obj, row, act){
				return getDictLabel(${fns:getDictListJson('approve_status_fraternity')}, val, '未知', true);
			}},
			{header:'操作', name:'actions', width:60, fixed:true, sortable:false, formatter: function(val, obj, row, act){
				var actions = [];//<shiro:hasPermission name="mih:fraternity:edit">
				if (row.status == Global.STATUS_NORMAL){
					actions.push('<a href="${ctx}/mih/fraternity/committeeForm?id='+row.id+'" class="btnList" title="审批"><i class="fa fa-pencil"></i></a>&nbsp;');
				}//</shiro:hasPermission>
				return actions.join('');
			}}
		],
		ajaxSuccess: function(data){ // 加载成功后执行方法
			
		}
	});
</script>